From: Florian Müllner Date: Fri, 1 Jul 2016 16:54:03 +0000 (+0200) Subject: osdWindow: Fix blurry level bar X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~807 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=424fa01ecaf137680688c8e0977a8bdd88711b18;p=gnome-shell.git osdWindow: Fix blurry level bar ClutterActor:width is a floating point property, so it will not be automatically rounded to non-fractional values that properly align to pixels. To fix the resulting blurriness, add explicit rounding. https://bugzilla.gnome.org/show_bug.cgi?id=768317 --- diff --git a/js/ui/osdWindow.js b/js/ui/osdWindow.js index c33e93775..4fd0c18f2 100644 --- a/js/ui/osdWindow.js +++ b/js/ui/osdWindow.js @@ -39,7 +39,7 @@ const LevelBar = new Lang.Class({ this._level = Math.max(0, Math.min(value, 100)); let alloc = this.actor.get_allocation_box(); - let newWidth = (alloc.x2 - alloc.x1) * this._level / 100; + let newWidth = Math.round((alloc.x2 - alloc.x1) * this._level / 100); if (newWidth != this._bar.width) this._bar.width = newWidth; }